草庐IT

jQuery Mobile 导航栏

全部标签

ios - 使用滑动手势在标签栏之间导航

我想使用滑动手势在我的标签栏之间导航。最简单的方法是什么?我试过这样的东西......importUIKitclasspostAdViewController:UIViewController{overridefuncviewDidLoad(){super.viewDidLoad()varleftSwipe=UISwipeGestureRecognizer(target:self,action:Selector("handleSwipes:"))view.addGestureRecognizer(leftSwipe)}funchandleSwipes(sender:UISwipeGes

ios - 如何在推送通知时导航到 View Controller

我想在收到推送通知后导航到某个ViewController。导航后,导航堆栈应该像用户手动进入View一样工作。Storyboard:http://www.xpos.nl/xpos/images/common/storyboard.png在AppDelegate.swift中我已经有:funcapplication(application:UIApplication,didReceiveRemoteNotificationuserInfo:[NSObject:AnyObject]){println("didReceiveRemoteNotification")letstoryboard

swift - 隐藏导航栏时隐藏状态栏 - SWIFT iOS8

每当View滚动时,我如何获得状态栏:self.navigationController?.hidesBarsOnSwipe=true或者如果不隐藏状态栏,我怎样才能让我的状态栏不覆盖我的View?非常棒的stackoverflow社区 最佳答案 一个Swift3优雅的解决方案:openoverridevarprefersStatusBarHidden:Bool{returnnavigationController?.isNavigationBarHidden??false} 关于swi

ios - 在标签栏 Controller 上使用导航栏

我是xcode的新手。我使用xcode7。我正在尝试在标签栏Controller上添加一个导航栏。在该屏幕截图中,我选择了顶部半透明条黑色,但在我运行项目时它没有出现我的主要目的是显示顶部栏并在其上添加图像(Logo)。我怎样才能做到这一点? 最佳答案 您的格式不正确。请在您的选项卡Controller中添加导航Controller。选择您的ViewController并单击Editor>EmbedIn>NavigationController像这样:像这样添加导航Controller:我希望它对你有用。将图像添加到您的导航栏:va

ios - 在我的 mapView Controller 中使用 iOS 中的 Mapbox 导航

我想在iOS中集成Mapbox导航,我可以很容易地获取两个坐标之间的方向/路线,也可以从mapbox获取导航路径,我们可以使用下面的代码letoptions=NavigationOptions(styles:nil)letviewController=NavigationViewController(for:self.directionsRoute!)viewController.delegate=selfself.present(viewController,animated:true,completion:nil)但问题是我想在我的mapview中显示导航,它是另一个ViewCon

ios - 导航栏在搜索结果表格 View 中消失

我正在尝试在导航栏中设置UISearchController并在外部Controller中显示结果。由于某些原因,我一输入内容,导航栏就消失了几个小时以来,我一直在尝试不同的解决方案,但没有结果。看起来这是一个与NavigationbardisappearswhentypinginUISearchControllertextfield类似的问题和NavigationbardisappearsifreloaddatawithUISearchController没有得到任何答复。self.cearchController=({//creatinganothertableviewletsto

Swift 导航栏项目不调用操作

我在导航栏上有一个调用操作的项目。它停止工作。我已将项目与操作断开连接并重新连接。还是没有Action。该Action附在Storyboard中。如何调试或解决此问题? 最佳答案 尝试这样的事情如果你有一个参数overridefuncviewDidLoad(){super.viewDidLoad()self.navigationItem.rightBarButtonItem=UIBarButtonItem(title:"ButtonName",style:.done,target:self,action:#selector(Your

ios - swift 将搜索栏添加到导航栏

我正在尝试将搜索栏添加到导航栏。我已经研究了一下,这是我到目前为止所做的:问题是使用这段代码navigationBar什么都没有出现。searchBar=UISearchBar(frame:CGRectMake(0,0,320,44))searchBar?.delegate=selfsearchBar?.showsCancelButton=truesearchController=UISearchDisplayController()searchController?.delegate=selfsearchController?.searchResultsDelegate=selfse

ios - 无法在最新 Xcode 版本的 Swift 中设置导航栏字体

以下代码在更新到Xcode6.1以跟上iOS8.1之前运行良好:overridefuncviewDidAppear(animated:Bool){self.navigationController?.navigationBar.topItem?.title="Home"self.navigationController?.navigationBar.titleTextAttributes=[NSFontAttributeName:UIFont(name:"Lobster1.4",size:34),NSForegroundColorAttributeName:UIColor.whiteC

swift - iOS - 在导航栏的标题中添加图像和文本

我想创建一个类似于所附图片中的导航栏。导航栏的标题将是图像和文本的组合。是否应根据任何最佳实践来完成此操作?如何做到? 最佳答案 作为thisanswershows,最简单的解决方案是将文本添加到您的图像并将该图像添加到导航栏,如下所示:varimage=UIImage(named:"logo.png")self.navigationItem.titleView=UIImageView(image:image)但如果您必须分别添加文本和图像(例如,在本地化的情况下),您可以通过将导航栏的标题View添加到UIView来将它们设置为同